package org.example.crop.controller.market;

import org.example.crop.domain.Market;
import org.example.crop.service.MarketService;
import org.example.crop.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("market")
public class MarketController {
    @Autowired
    private MarketService marketService;
    @RequestMapping("list")
    public Result list(){
        List<Market> list = marketService.list();
        return Result.success(list);
    }
}
